package com.gistone.commis.entity;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.NoArgsConstructor;
import lombok.*;

import java.util.Date;
@Setter
@ToString
@Getter
@AllArgsConstructor
@NoArgsConstructor
public class Overtime {
    private Integer overtimeId;

    private Integer personId;
    private Person person;
    private Integer communityId;

    private Integer departId;

    private Integer userId;
    private  User user;
    private String personName;
    @JsonFormat(pattern="yyyy-MM-dd HH:mm:ss")
    private Date registerTime;
    @JsonFormat(pattern="yyyy-MM-dd")
    private Date otTime;

    private Double otLength;//正常加班时长

    private String otReason;

    private Double otType;//节假日加班时长

    private Integer otYear;

    private Integer otMonth;

    private String reserveA;

    private String reserveB;

    public Overtime(Integer overtimeId, Integer personId, Integer communityId, Integer departId, Integer userId, String personName, Date registerTime, Date otTime, Double otLength, String otReason, Double otType, Integer otYear, Integer otMonth, String reserveA, String reserveB) {
        this.overtimeId = overtimeId;
        this.personId = personId;
        this.communityId = communityId;
        this.departId = departId;
        this.userId = userId;
        this.personName = personName;
        this.registerTime = registerTime;
        this.otTime = otTime;
        this.otLength = otLength;
        this.otReason = otReason;
        this.otType = otType;
        this.otYear = otYear;
        this.otMonth = otMonth;
        this.reserveA = reserveA;
        this.reserveB = reserveB;
    }
}